From: Andy Chiang Date: Mon, 20 Oct 2025 01:22:11 +0000 (+0700) Subject: luci-mod-system: fix JSMIN Error X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=b47c94cabb1286a856a3c097544610ad691ba9d2;p=project%2Fluci.git luci-mod-system: fix JSMIN Error jsmin cannot handle regular expressions in this format, so use RegExp() instead. fixes: #8020 Signed-off-by: Andy Chiang --- diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js index 6703a50970..2b1b757198 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/repokeys.js @@ -117,7 +117,7 @@ function removeKey(ev) { } function isPemFormat(content) { - return /-BEGIN ([A-Z ]+)?PUBLIC KEY-/.test(content); + return new RegExp('-BEGIN ([A-Z ]+)?PUBLIC KEY-').test(content); } function keyEnvironmentCheck(key) {